﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Dialog.Master" AutoEventWireup="true"
    CodeBehind="BatchDescriptionEdit.aspx.cs" Inherits="NetDon.OA.Portal.HtmlTool.BatchDescriptionEdit" %>

<%@ Import Namespace="NetDon.eBoss.Data.EntityClasses" %>
<%@ Register TagPrefix="uc1" TagName="RequiredMark_1" Src="~/Controls/RequiredMark.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language="javascript" type="text/javascript">

        $(document).ready(function () {
            var dialog;
            if (window.top == window) {
                dialog = window;
            } else {

                dialog = window.top.Page.Dialog.find(function (item) {
                    return item._contentFrame.contentWindow == window;
                });

            }
            var fieldId = $get('<%=this.fieldIds.ClientID %>');


            var reloadButton = $get('<%=btnReLoadIds.ClientID %>');
            if (dialog && !reloadButton.disabled) {

                $text(fieldId, dialog._context.dialogArguments.Ids);
                reloadButton.click();


            }
        });


    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="panelBasic" runat="server" DefaultButton="btnSave">
        <NetDon:FormPanel ID="panelCustomInfo" runat="server" CaptionAlign="NotSet" RepeatColumns="2">
            <Items>
                <NetDon:FormItem HeaderText="当前账号：" FullRow="True">
                    <ContentTemplate>
                        <%# DefaultAccount.Accountname%>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="HtmlTool分类" ColumnSpan="2">
                    <ContentTemplate>
                        <asp:DropDownList ID="ddlHtmlToolCategory" DataSourceID="ObjectDataSourceCategory"
                            AppendDataBoundItems="True" runat="server" DataTextField="Category" DataValueField="Id"
                            AutoPostBack="True" OnSelectedIndexChanged="ddlHtmlToolCategory_SelectedIndexChanged">
                        </asp:DropDownList>
                        <asp:ObjectDataSource ID="ObjectDataSourceCategory" runat="server" OldValuesParameterFormatString="original_{0}"
                            SelectMethod="RetrieveHtmlToolEbayCategory" TypeName="NetDon.eBoss.Portal.HtmlTool.HtmlToolDataSource">
                        </asp:ObjectDataSource>
                        <uc1:RequiredMark_1 ID="RequiredMark3" runat="server" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="ddlHtmlToolCategory"
                            Display="None" ErrorMessage="请选择HtmlTool分类" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="英文标题" ColumnSpan="2">
                    <ContentTemplate>
                        <asp:TextBox ID="txtEnglishtitle" runat="server" Text='<%#Bind("Englishtitle") %>'
                            Width="400px"></asp:TextBox>
                        <uc1:RequiredMark_1 ID="RequiredMark7" runat="server" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtEnglishtitle"
                            Display="None" ErrorMessage="请输入英文标题" SetFocusOnError="True"></asp:RequiredFieldValidator>
                        <asp:CollapsiblePanelExtender ID="cpe" runat="Server" TargetControlID="pnlTitleVocabulary"
                            CollapsedSize="0" ExpandedSize="300" Collapsed="True" ExpandControlID="LinkButton1"
                            CollapseControlID="LinkButton1" AutoCollapse="False" AutoExpand="False" ScrollContents="True"
                            TextLabelID="Label1" CollapsedText="Show Details..." ExpandedText="Hide Details"
                            ImageControlID="ImageTitle" ExpandedImage="~/images/Button/collapse.jpg" CollapsedImage="~/images/Button/expand.jpg"
                            ExpandDirection="Vertical" />
                        <asp:LinkButton runat="server" ID="LinkButton1">
                            <asp:Image runat="server" ID="ImageTitle"></asp:Image>
                            <asp:Label runat="server" ID="Label1"></asp:Label></asp:LinkButton>
                        <asp:Panel runat="server" ID="pnlTitleVocabulary" class="collapsePanelHeader" Style="height: 30px;
                            width: 460px">
                            <p style="font-size: 15px">
                                <asp:Label runat="server" ID="lblTitleVocabulary"></asp:Label>
                            </p>
                        </asp:Panel>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="品牌">
                    <ContentTemplate>
                        <asp:DropDownList ID="ddlHtmlToolTrademark" DataSourceID="ObjectDataSourceHtmlToolTrademark"
                            AppendDataBoundItems="True" runat="server" DataTextField="Name" DataValueField="Id"
                            AutoPostBack="True" OnSelectedIndexChanged="ddlHtmlToolTrademark_SelectedIndexChanged">
                        </asp:DropDownList>
                        <asp:ObjectDataSource ID="ObjectDataSourceHtmlToolTrademark" runat="server" OldValuesParameterFormatString="original_{0}"
                            SelectMethod="RetrieveHtmlToolTrademark" TypeName="NetDon.eBoss.Portal.HtmlTool.HtmlToolDataSource">
                        </asp:ObjectDataSource>
                        <uc1:RequiredMark_1 ID="RequiredMark5" runat="server" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddlHtmlToolTrademark"
                            Display="None" ErrorMessage="请选择品牌" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="市场">
                    <ContentTemplate>
                        <asp:TextBox ID="txtMarket" runat="server" Text='<%#Bind("Market") %>' Enabled="False">
                        </asp:TextBox>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="ebay款式">
                    <ContentTemplate>
                        <asp:DropDownList ID="ddlHtmlToolStyle" AppendDataBoundItems="True" runat="server"
                            DataTextField="Style" DataValueField="Id">
                        </asp:DropDownList>
                        <uc1:RequiredMark_1 ID="RequiredMark1" runat="server" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlHtmlToolStyle"
                            Display="None" ErrorMessage="请选择ebay款式" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="ebay颜色">
                    <ContentTemplate>
                        <asp:Label ID="txteBayColor" runat="server"></asp:Label>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="货号">
                    <ContentTemplate>
                        <asp:Label ID="txtItemNo" runat="server" Text='<%#Bind("ItemNo") %>'>
                        </asp:Label>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="零售价" ColumnSpan="2">
                    <ContentTemplate>
                        <asp:TextBox ID="txtRetailPrice" Text='<%#Eval("RetailPrice")%>' runat="server" MaxLength="9"
                            Width="60px" Style="text-align: right"></asp:TextBox>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="特征" ColumnSpan="2">
                    <ContentTemplate>
                        <asp:TextBox ID="txtSpecifics" runat="server" Text='<%#Bind("Specifics") %>' Width="400px"></asp:TextBox>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="尺码表" ColumnSpan="2">
                    <ContentTemplate>
                        <asp:TextBox ID="txtSizetable" runat="server" Text='<%#Bind("Sizetable") %>' Width="400px">       </asp:TextBox>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="材料" ColumnSpan="2">
                    <ContentTemplate>
                        <asp:TextBox ID="txtMaterial" runat="server" Text='<%#Bind("Material") %>' Width="400px">
                        </asp:TextBox><uc1:RequiredMark_1 ID="RequiredMark6" runat="server" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtMaterial"
                            Display="None" ErrorMessage="请输入材料" SetFocusOnError="True"></asp:RequiredFieldValidator>
                        <asp:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="Server" TargetControlID="pnlMaterialVocabulary"
                            CollapsedSize="0" ExpandedSize="300" Collapsed="True" ExpandControlID="LinkButton2"
                            CollapseControlID="LinkButton2" AutoCollapse="False" AutoExpand="False" ScrollContents="True"
                            TextLabelID="Label2" CollapsedText="Show Details..." ExpandedText="Hide Details"
                            ImageControlID="ImageMaterial" ExpandedImage="~/images/Button/collapse.jpg" CollapsedImage="~/images/Button/expand.jpg"
                            ExpandDirection="Vertical" />
                        <asp:LinkButton runat="server" ID="LinkButton2">
                            <asp:Image runat="server" ID="ImageMaterial"></asp:Image>
                            <asp:Label runat="server" ID="Label2"></asp:Label></asp:LinkButton>
                        <asp:Panel runat="server" ID="pnlMaterialVocabulary" class="collapsePanelHeader"
                            Style="height: 30px; width: 460px">
                            <p style="font-size: 15px">
                                <asp:Label runat="server" ID="labelVocabularyMaterial"></asp:Label>
                            </p>
                        </asp:Panel>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="注意" ColumnSpan="2">
                    <ContentTemplate>
                        <asp:TextBox ID="txtComment" runat="server" Text='<%#Bind("Comment") %>' TextMode="MultiLine"
                            Width="400px" Height="90px">
                        </asp:TextBox>
                    </ContentTemplate>
                </NetDon:FormItem>
                <NetDon:FormItem HeaderText="描述" ColumnSpan="2">
                    <ContentTemplate>
                        <asp:TextBox ID="txtDescription" runat="server" Text='<%#Bind("Description") %>'
                            TextMode="MultiLine" Width="400px" Height="70px">
                        </asp:TextBox>
                        <uc1:RequiredMark_1 ID="RequiredMark2" runat="server" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtDescription"
                            Display="None" ErrorMessage="请输入描述" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </ContentTemplate>
                </NetDon:FormItem>
            </Items>
        </NetDon:FormPanel>
        <div style="padding-top: 10px">
            <center>
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click"></asp:Button>
                <asp:Button ID="btnReturn" runat="server" Text="退出" CausesValidation="false"></asp:Button>
                <NetDon:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="true"
                    ShowSummary="false" />
                <br />
                <br />
                <br />
            </center>
        </div>
    </asp:Panel>
    <asp:HiddenField ID="fieldIds" runat="server" />
    <asp:Button ID="btnReLoadIds" runat="server" SkinID="Hidden" OnClick="btnReLoadIds_Click"
        CausesValidation="false" />
</asp:Content>
